package com.beichuan_travel.controller;

import com.beichuan_travel.model.vo.ResultVO;
import com.beichuan_travel.service.HomePageService;
import com.beichuan_travel.utils.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "首页相关接口")
@RequestMapping("/homepage")
@RestController
public class HomePageController {

    @Resource
    HomePageService homePageService;

    @Resource
    ResponseResult responseResult;


    @ApiOperation(value = "获得红色文化旅游的相关推荐")
    @ApiImplicitParam(name = "number", value = "推荐的条数", required = true, dataType = "int", paramType = "query")
    @GetMapping("tour")
    public ResultVO tourList(int number) {
        return null;
    }


    @ApiOperation(value = "获得首页广告")
    @ApiImplicitParam(name = "number", value = "获取的广告条数", required = true, dataType = "int", paramType = "query")
    @GetMapping("/ad")
    public ResultVO getAd(int number) {
        return responseResult.ok(homePageService.getAdvertisementBanner(number));
    }



}
